module.exports = (db, DataTypes) => {
  return db.define('ApprovalPrivileges', {
    type: DataTypes.STRING, // ['Construction', 'RequestChange', 'ExternalTest', 'ProjectTest', 'Maintain']
    step: DataTypes.INTEGER,
    createdAt: DataTypes.DATE,
    updatedAt: DataTypes.DATE,
  }, {
    associate(models) {
      models.ApprovalPrivileges.belongsTo(models.User, { foreignKey: 'UserId' });
    }
  })
};
